<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-people-add">

			<div class="form-group hide">
				<label class="col-sm-3 control-label  ">批次ID：</label>
				<div class="col-sm-8">
					<input id="companyId" name="companyId" th:value="${people.companyId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">姓名：</label>
				<div class="col-sm-8">
					<input id="peopleName" name="peopleName" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">身份证号：</label>
				<div class="col-sm-8">
					<input id="peopleIdCard" name="peopleIdCard" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">所在地市行政区划代码：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="addressCode" name="addressCode" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">详细地址：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleDetailAdress" name="peopleDetailAdress" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号：</label>
				<div class="col-sm-8">
					<input id="peopleConnectPhone" name="peopleConnectPhone" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">岗位（工种）：</label>
				<div class="col-sm-8">
					<input id="peopleJob" name="peopleJob" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">人员类型：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="propleType" name="propleType" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">车辆牌照号：</label>
				<div class="col-sm-8">
					<input id="peopleCarLicense" name="peopleCarLicense" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">车辆类型：</label>
				<div class="col-sm-8">
					<input id="carType" name="carType" class="form-control" type="text">
				</div>
			</div>
<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">员工所在地指挥部ID：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleControId" name="peopleControId" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">区划：</label>
				<div class="col-sm-8">
					<input id="aera" name="aera" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">市（州）：</label>
				<div class="col-sm-8">
					<input id="peopleCity" name="peopleCity" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">县（市、区）：</label>
				<div class="col-sm-8">
					<input id="peopleCounty" name="peopleCounty" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">乡镇（办、场、区：</label>
				<div class="col-sm-8">
					<input id="peopleTownship" name="peopleTownship" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">社区（村）：</label>
				<div class="col-sm-8">
					<input id="peopleVillage" name="peopleVillage" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">现居留地县指挥部健康证明（是/否）：</label>
				<div class="col-sm-3">
					<input type="checkbox" id="nowAddressHealth" name="nowAddressHealth" class="form-control" style="max-height: 20px;margin-top: 10px;">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">上传健康证明文件：</label>
				<div class="col-sm-8">
					<input type="file" class="btn btn-w-m btn-default" name="fileName" accept="image/png,image/jpeg,image/jp2" />
					<!--<input id="resourceRelativePath" name="resourceRelativePath" class="form-control" type="text">-->
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">申请返回时间：</label>
				<div class="col-sm-8">
					<input id="applyTime" name="applyTime" class="form-control" type="date">
				</div>
			</div>

<!--			<div class="form-group">-->
<!--				<label class="col-sm-3 control-label">区划：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="aera" name="aera" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->

<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">市（州）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleCity" name="peopleCity" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">县（市、区）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleCounty" name="peopleCounty" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">乡镇（办、场、区：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleTownship" name="peopleTownship" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">社区（村）：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleVillage" name="peopleVillage" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->

<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">驾驶人/返岗人员：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleBackPeople" name="peopleBackPeople" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->

			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">健康证明文件地址：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="peopleLinkAdress" name="peopleLinkAdress" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
<!--			<div class="form-group">	-->
<!--				<label class="col-sm-3 control-label">填报时间：</label>-->
<!--				<div class="col-sm-8">-->
<!--					<input id="peopleFillTime" name="peopleFillTime" class="form-control" type="text">-->
<!--				</div>-->
<!--			</div>-->


		</form>
	</div>
    <div th:include="include::footer"></div>
	<script src="../static/ruoyi/js/card.js" th:src="@{/ruoyi/js/card.js}"></script>
    <script type="text/javascript">
		var prefix = ctx + "system/people"
		jQuery.validator.addMethod("isIdCardNo", function(value, element) {
			return this.optional(element) || IdCardUtils.checkIdCardNum(value);
		}, "请正确输入您的身份证号码");
		jQuery.validator.addMethod("IsGovernmentNum", function(value, element) {
			return this.optional(element) || governmentCode.verify(value);
		}, "请正确输入正确的企业代码");
		$("#form-people-add").validate({
			rules:{
                peopleConnectPhone:{
                    required:true,
					rangelength:[11,11]
                },

                peopleName:{
                    required:true,
					rangelength:[1,5]
                },
                peopleIdCard:{
                    required:true,
					isIdCardNo:true
                },
				applyTime:{
                	required:true
				}
			},
			messages: {
				peopleConnectPhone:{
					required:"请输入手机号"

				},
				peopleName: {
					required: "请输入返岗人员姓名"
				},
				peopleIdCard: {
					required: "岗位名称已经存在",
					isIdCardNo:"请输入正确的身份证号"
				}
			}
		});
        function upload() {
            var formData = new FormData($("#form-people-add")[0]);
            $.modal.loading("正在上传数据，请稍后...");
            $.ajax({
                cache : true,
                type : "POST",
                url : prefix + "/add",
                data : formData,
                contentType:false,
                processData:false,
                mimeType:"multipart/form-data",
                error : function(request) {
                    $.modal.alertError("系统错误");
                },
                success : function(data) {
                    var jData = $.parseJSON(data);
                    $.operate.successCallback(jData);
                    $.modal.closeLoading();
                }
            });
        }
		
		function submitHandler() {
	        if ($.validate.form()) {
                upload();
	            // $.operate.save(prefix + "/add", $('#form-people-add').serialize());
	        }
	    }
	</script>
</body>

</html>
